Package GraphicThreads
Class BalanceThread<T extends java.io.Serializable & java.lang.Comparable<T>>
- java.lang.Object
-
- java.lang.Thread
-
- GraphicThreads.GraphicThread
-
- GraphicThreads.BalanceThread<T>
-
- All Implemented Interfaces:
java.lang.Runnable
public class BalanceThread<T extends java.io.Serializable & java.lang.Comparable<T>> extends GraphicThread
-
-
Constructor Summary
Constructors Constructor Description BalanceThread(MyPane<T> _pane)
konstruktor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
vypocita balance pre tree1 vysledok vypise a caka na uzivatela pokial potvrdi ze si informaciu precitaldouble
threadBalance(Node<T> node)
prerobeny graficky balance vypocita balance pre vrchol nasledovne pre kazdeho syna zisti jeho velkost od najvacsieho odcita rozdiel ktory zpriemeruje-
Methods inherited from class GraphicThreads.GraphicThread
getPane, getTree, setPane, setSleepTime, setTree, skip, threadFindFatherByNode, threadRemove
-
Methods inherited from class java.lang.Thread
activeCount, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
threadBalance
public double threadBalance(Node<T> node)
prerobeny graficky balance vypocita balance pre vrchol nasledovne pre kazdeho syna zisti jeho velkost od najvacsieho odcita rozdiel ktory zpriemeruje- Parameters:
node
- vrchol ktoreho balance chceme
-
run
public void run()
vypocita balance pre tree1 vysledok vypise a caka na uzivatela pokial potvrdi ze si informaciu precital- Specified by:
run
in interfacejava.lang.Runnable
- Specified by:
run
in classGraphicThread
-
-